// 04 - src - renderprops - children使用;
import  { Component } from "react";
import Cat from "./components/Cat";
import Mouse from "./components/Mouse";
import Position from "./Position";
export default class App extends Component {
    render() {
      return (
        <div>
          <h1>猫捉老鼠</h1>
          <Position>{(state) => <Mouse state={state}></Mouse>}</Position>
          {/* 使用该传输方法，下一级要使用this.props.children获取 */}
          <Position>{(state) => <Cat state={state}></Cat>}</Position>
        </div>
      );
    }
}